package com.aboverock.core.shiro.util;

import org.apache.shiro.crypto.hash.SimpleHash;

public class ShiroHashEncryptUtil {

    public static final String HASH_ALGORITHM = "MD5";

    public static final String HASH_SALT = "@envisi0n";
    
    public static final int HASH_ITERATIONS = 2;

    public static String encrypt(String rawData) {
        if (null == rawData) {
            return "";
        }
        return new SimpleHash(HASH_ALGORITHM, rawData, HASH_SALT, HASH_ITERATIONS).toString();
    }
}
